#ifndef PARSE_HEAD_
#define PARSE_HEAD_

#include "ParsePAT.h"

typedef struct TS_Package_Head
{
    unsigned sync_byte                          :8;
    unsigned transport_error_indicator          :1;
    unsigned payload_unit_start_indicator       :1;
    unsigned transport_priority                 :1;
    unsigned PID                                :13;
    unsigned transport_scrambling_control       :2;
    unsigned adaptation_field_control           :2;
    unsigned continuity_counter                 :4;
}TS_Package_Head;

TS_Package_Head ParseTS_Type();
TS_PAT *ParseTS_PAT(int TsPackage_len, TS_Package_Head TS_PackagePATHead);
void ParseTS_PMT(int TsPackage_len, TS_Package_Head TS_PackagePMTHead);
void List();
void ParseTS_NIT_0(int TsPackage_len,TS_Package_Head TS_PackageNITHead);
void ParseTS_NIT_1(int TsPackage_len,TS_Package_Head TS_PackageNITHead);
void ParseTS_BAT_0(int TsPackage_len,TS_Package_Head TS_PackageBATHead);
void ParseTS_BAT_1(int TsPackage_len,TS_Package_Head TS_PackageBATHead);
void ParseTS_SDT_0(int TsPackage_len,TS_Package_Head TS_PackageSDTHead);
void ParseTS_SDT_1(int TsPackage_len,TS_Package_Head TS_PackageSDTHead);
void ParseTS_EIT_0(int TsPackage_len,TS_Package_Head TS_PackageEITHead);
void ParseTS_EIT_1(int TsPackage_len,TS_Package_Head TS_PackageEITHead);


#endif